package com.yuwen.yuwenRPC.fault.tolerant;


import com.yuwen.yuwenRPC.model.RpcRequest;
import com.yuwen.yuwenRPC.model.RpcResponse;

import java.util.Map;

/**
 * 容错机制
 */
public interface TolerantStrategy {

    /**
     * 容错
     * @param context 上下文，传递数据
     * @param e 异常类型
     * @return
     */
    RpcResponse doTolerant(Map<String, Object> context,Exception e);
}
